<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>{pboot:if('{sort:title}'=='')}{pboot:pagetitle}{else}{sort:title}{/pboot:if}</title>
<meta name="keywords" content="{pboot:if('{sort:keywords}'=='')}{pboot:pagekeywords}{else}{sort:keywords}{/pboot:if}">
<meta name="description" content="{pboot:if('{sort:description}'=='')}{pboot:pagedescription}{else}{sort:description}{/pboot:if}">
<meta http-equiv="X-Frame-Options" content="deny">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=5, viewport-fit=cover" />
<meta name="format-detection" content="telephone=no" />
<meta name="application-name" content="" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link href="{pboot:sitedomain}/skin/css/cn.css" rel="stylesheet" />
<link href="{pboot:sitedomain}/skin/css/style.css" rel="stylesheet" />
<link href="{pboot:sitedomain}/skin/css/templates.css" rel="stylesheet" type="text/css">
<link href="{pboot:sitedomain}/skin/css/page.css" rel="stylesheet" type="text/css" />
</head>
<body>
{include file=head.html}
<main>
  <div class="inner-banner"> {pboot:sort scode={sort:tcode}}<img src="[sort:pic]" class="innerbanners" alt="[sort:name]" />{/pboot:sort}
    <div class="inner-content">
      <div class="l-wrap">
        <h1 class="page-title-h1">{sort:name}</h1>
        <div class="page-breadcrumbs">{pboot:position indextext=HOME}</div>
      </div>
    </div>
  </div>
  <div class="common-main">
    <div class="l-wrap">
      <article>
        <div class="contact-wrap">
          <div class="contact-sidebar">
            <div class="h1">Contact Us</div>
            <div class="item ab_img">
              {content:content}
            </div>
          </div>
          <div class="contact-main">
            <div class="inquiry-wrap">
              <div class="inquiry-title">Send us a message</div>
              <div id="feedbackForm">&nbsp;
                <div class="send-inquiry default">
                  <form class="inquiry-form" onsubmit="return submsg(this);" method="post">
                    <input type="text" id="name" placeholder="Your Name:" name="name">
                    <input type="text" id="email" class="require input-error" placeholder="E-mail:" name="email">
                    <textarea id="content" cols="30" rows="10" class="require input-error" placeholder="Content" name="content"></textarea>
                    <div class="send-btn hvr-icon-wobble-horizontal hvr-bounce-to-right-y">
                      <button type="submit" class="span" id="tj" style="padding: 5px 25px;background: #58b33e;color: #fff;">Send</button>
                      <div class="span"><i class="iconfont icon-angle-right hvr-icon" aria-hidden="true"></i></div>
                    </div>
                  </form>
                </div>
              </div>
            </div>
          </div>
        </div>
      </article>
    </div>
  </div>
</main>
{include file=foot.html}
<script src="{pboot:sitedomain}/skin/js/jquery-3.6.1.js"></script> 
<script src="{pboot:sitedomain}/skin/js/swiper.js"></script> 
<script src="{pboot:sitedomain}/skin/js/lazyload.min.js"></script> 
<script src="{pboot:sitedomain}/skin/js/style.js"></script> 
<script>
	$(function(){
		$('#tj').click(function(){
			//alert(1)
			if($('#name').val()==''){alert('Please enter your name！'); $("#name").focus(); return false;}
			if ($("#email").val() == "") { alert("Please enter your email address!"); return false; } 
			if (!$("#email").val().match(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/)) { alert("The email format is incorrect！"); $("#email").focus(); return false; } 
			if($('#content').val()==''){alert('Please enter the message content！');return false;}
		})
	})
</script>
<script>
//ajax提交留言
function submsg(obj){
  var url='{pboot:msgaction}';
  var name=$(obj).find("#name").val();
  var email=$(obj).find("#email").val();
  var content=$(obj).find("#content").val();
  
  $.ajax({
    type: 'POST',
    url: url,
    dataType: 'json',
    data: {
    	name: name,
    	email: email,
    	content: content
    },
    success: function (response, status) {
      if(response.code){
		 alert("Thank you for your feedback, we will contact you soon!");
		 $(obj)[0].reset(); 
      }else{
    	 alert(response.data);
      }
    },
    error:function(xhr,status,error){
      alert('Return data exception!');
    }
  });
  return false;
}
</script> 
</body>
</html>